Analysis of GLDS-208_Array from NASA GeneLab

This R markdown file was auto-generated by the iDEP website Using iDEP 0.91, originally by Steven

Ge SX, Son EW, Yao R: iDEP: an integrated web application for differential expression and pathway analysis of RNA-Seq data. BMC Bioinformatics 2018, 19(1):534. PMID:30567491

1. Read data

First we set up the working directory to where the files are saved.

 setwd('~/Documents/HTML_R/GLDS208_Array')

R packages and iDEP core Functions. Users can also download the iDEP_core_functions.R file. Many R packages needs to be installed first. This may take hours. Each of these packages took years to develop.So be a patient thief. Sometimes dependencies needs to be installed manually. If you are using an older version of R, and having trouble with package installation, try un-install the current version of R, delete all folders and files (C:/Program Files/R/R-3.4.3), and reinstall from scratch.

 if(file.exists('iDEP_core_functions.R'))
    source('iDEP_core_functions.R') else 
    source('https://raw.githubusercontent.com/iDEP-SDSU/idep/master/shinyapps/idep/iDEP_core_functions.R') 

We are using the downloaded gene expression file where gene IDs has been converted to Ensembl gene IDs. This is because the ID conversion database is too large to download. You can use your original file if your file uses Ensembl ID, or you do not want to use the pathway files available in iDEP (or it is not available).

 inputFile <- 'GLDS208_Array_Expression.csv'
 sampleInfoFile <- 'GLDS208_Array_Sampleinfo.csv'
 gldsMetadataFile <- 'GLDS208_Array_Metadata.csv'
 geneInfoFile <- 'Arabidopsis_thaliana__athaliana_eg_gene_GeneInfo.csv' #Gene symbols, location etc. 
 geneSetFile <- 'Arabidopsis_thaliana__athaliana_eg_gene.db'  # pathway database in SQL; can be GMT format 
 STRING10_speciesFile <- 'https://raw.githubusercontent.com/iDEP-SDSU/idep/master/shinyapps/idep/STRING10_species.csv' 

Parameters for reading data

 input_missingValue <- 'geneMedian' #Missing values imputation method
 input_dataFileFormat <- 1  #1- read counts, 2 FKPM/RPKM or DNA microarray
 input_minCounts <- 0.5 #Min counts
 input_NminSamples <- 1 #Minimum number of samples 
 input_countsLogStart <- 4  #Pseudo count for log CPM
 input_CountsTransform <- 1 #Methods for data transformation of counts. 1-EdgeR's logCPM 2-VST, 3-rlog 
readMetadata.out <- readMetadata(gldsMetadataFile)
library(knitr)   #  install if needed. for showing tables with kable
library(kableExtra)
kable( readMetadata.out ) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%")
ZoneI_Rep1 ZoneI_Rep2 ZoneI_Rep3 ZoneII_Rep1 ZoneII_Rep2 ZoneII_Rep3
Sample.LongId Atha.Col.0.Root.Zone.I.Rep1.Array Atha.Col.0.Root.Zone.I.Rep2.Array Atha.Col.0.Root.Zone.I.Rep3.Array Atha.Col.0.Root.Zone.II.Rep1.Array Atha.Col.0.Root.Zone.II.Rep2.Array Atha.Col.0.Root.Zone.II.Rep3.Array
Sample.Id Atha.Col.0.Root.Zone.I.Rep1 Atha.Col.0.Root.Zone.I.Rep2 Atha.Col.0.Root.Zone.I.Rep3 Atha.Col.0.Root.Zone.II.Rep1 Atha.Col.0.Root.Zone.II.Rep2 Atha.Col.0.Root.Zone.II.Rep3
Sample.Name Atha_Col-0_Root_Zone-I_Rep1 Atha_Col-0_Root_Zone-I_Rep2 Atha_Col-0_Root_Zone-I_Rep3 Atha_Col-0_Root_Zone-II_Rep1 Atha_Col-0_Root_Zone-II_Rep2 Atha_Col-0_Root_Zone-II_Rep3
GLDS 208 208 208 208 208 208
Accession GLDS-208 GLDS-208 GLDS-208 GLDS-208 GLDS-208 GLDS-208
Hardware Petri dish Petri dish Petri dish Petri dish Petri dish Petri dish
Tissue Meristem zone 1 Meristem zone 1 Meristem zone 1 Elongation zone 2 Elongation zone 2 Elongation zone 2
Age 8 days 8 days 8 days 8 days 8 days 8 days
Organism Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana Arabidopsis thaliana
Ecotype Col-0 Col-0 Col-0 Col-0 Col-0 Col-0
Genotype WT WT WT WT WT WT
Variety Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT Col-0 WT
Radiation Background Earth Background Earth Background Earth Background Earth Background Earth Background Earth
Gravity Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial Terrestrial
Developmental 8 day old seedlings root tip meristem and elongation zone 8 day old seedlings root tip meristem and elongation zone 8 day old seedlings root tip meristem and elongation zone 8 day old seedlings root tip meristem and elongation zone 8 day old seedlings root tip meristem and elongation zone 8 day old seedlings root tip meristem and elongation zone
Time.series.or.Concentration.gradient Single time point Single time point Single time point Single time point Single time point Single time point
Light White light White light White light White light White light White light
Assay..RNAseq. RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling RNAseq Transcription Profiling
Temperature 18-20 18-20 18-20 18-20 18-20 18-20
Treatment.type Comparative gene expression analysis in the Arabidopsis thaliana root apex using RNA-seq and microarray transcriptome profiles (microarray) Comparative gene expression analysis in the Arabidopsis thaliana root apex using RNA-seq and microarray transcriptome profiles (microarray) Comparative gene expression analysis in the Arabidopsis thaliana root apex using RNA-seq and microarray transcriptome profiles (microarray) Comparative gene expression analysis in the Arabidopsis thaliana root apex using RNA-seq and microarray transcriptome profiles (microarray) Comparative gene expression analysis in the Arabidopsis thaliana root apex using RNA-seq and microarray transcriptome profiles (microarray) Comparative gene expression analysis in the Arabidopsis thaliana root apex using RNA-seq and microarray transcriptome profiles (microarray)
Treatment.intensity x x x x x x
Treament.timing x x x x x x
 readData.out <- readData(inputFile) 
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
   kable( head(readData.out$data) ) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
ZoneI_Rep1 ZoneI_Rep2 ZoneI_Rep3 ZoneII_Rep1 ZoneII_Rep2 ZoneII_Rep3
AT2G36100 2.807355 2.584963 2.807355 3.906891 3.906891 3.807355
AT5G66390 2.584963 2.584963 2.584963 3.906891 3.807355 3.807355
AT5G04960 3.169925 2.584963 2.584963 3.906891 3.906891 3.906891
AT5G67400 2.807355 2.807355 2.584963 3.906891 3.906891 3.906891
AT5G42180 2.584963 2.584963 2.584963 3.807355 3.807355 3.700440
AT5G35190 2.584963 2.584963 2.321928 3.700440 3.700440 3.700440
 readSampleInfo.out <- readSampleInfo(sampleInfoFile) 
 kable( readSampleInfo.out ) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Tissue
ZoneI_Rep1 Meristem_zone1
ZoneI_Rep2 Meristem_zone1
ZoneI_Rep3 Meristem_zone1
ZoneII_Rep1 Elongation_zone2
ZoneII_Rep2 Elongation_zone2
ZoneII_Rep3 Elongation_zone2
 input_selectOrg ="NEW" 
 input_selectGO <- 'GOBP'   #Gene set category 
 input_noIDConversion = TRUE  
 allGeneInfo.out <- geneInfo(geneInfoFile) 
 converted.out = NULL 
 convertedData.out <- convertedData()    
 nGenesFilter()  
## [1] "16156 genes in 6 samples. 16156  genes passed filter.\n Original gene IDs used."
 convertedCounts.out <- convertedCounts()  # converted counts, just for compatibility 

2. Pre-process

# Read counts per library 
 parDefault = par() 
 par(mar=c(12,4,2,2)) 
 # barplot of total read counts
 x <- readData.out$rawCounts
 groups = as.factor( detectGroups(colnames(x ) ) )
 if(nlevels(groups)<=1 | nlevels(groups) >20 )  
  col1 = 'green'  else
  col1 = rainbow(nlevels(groups))[ groups ]             
         
 barplot( colSums(x)/1e6, 
        col=col1,las=3, main="Total read counts (millions)")  

 readCountsBias()  # detecting bias in sequencing depth 
## [1] 0.5852447
## [1] 0.5852447
## [1] "No bias detected"
 # Box plot 
 x = readData.out$data 
 boxplot(x, las = 2, col=col1,
    ylab='Transformed expression levels',
    main='Distribution of transformed data') 

 #Density plot 
 par(parDefault) 
## Warning in par(parDefault): graphical parameter "cin" cannot be set
## Warning in par(parDefault): graphical parameter "cra" cannot be set
## Warning in par(parDefault): graphical parameter "csi" cannot be set
## Warning in par(parDefault): graphical parameter "cxy" cannot be set
## Warning in par(parDefault): graphical parameter "din" cannot be set
## Warning in par(parDefault): graphical parameter "page" cannot be set
 densityPlot()       

 # Scatter plot of the first two samples 
 plot(x[,1:2],xlab=colnames(x)[1],ylab=colnames(x)[2], 
    main='Scatter plot of first two samples') 

 ####plot gene or gene family
 input_selectOrg ="BestMatch" 
 input_geneSearch <- 'HOXA' #Gene ID for searching 
 genePlot()  
## NULL
 input_useSD <- 'FALSE' #Use standard deviation instead of standard error in error bar? 
 geneBarPlotError()       
## NULL

3. Heatmap

 # hierarchical clustering tree
 x <- readData.out$data
 maxGene <- apply(x,1,max)
 # remove bottom 25% lowly expressed genes, which inflate the PPC
 x <- x[which(maxGene > quantile(maxGene)[1] ) ,] 
 plot(as.dendrogram(hclust2( dist2(t(x)))), ylab="1 - Pearson C.C.", type = "rectangle") 

 #Correlation matrix
 input_labelPCC <- TRUE #Show correlation coefficient? 
 correlationMatrix() 

 # Parameters for heatmap
 input_nGenes <- 1000   #Top genes for heatmap
 input_geneCentering <- TRUE    #centering genes ?
 input_sampleCentering <- FALSE #Center by sample?
 input_geneNormalize <- FALSE   #Normalize by gene?
 input_sampleNormalize <- FALSE #Normalize by sample?
 input_noSampleClustering <- FALSE  #Use original sample order
 input_heatmapCutoff <- 4   #Remove outliers beyond number of SDs 
 input_distFunctions <- 1   #which distant funciton to use
 input_hclustFunctions <- 1 #Linkage type
 input_heatColors1 <- 1 #Colors
 input_selectFactorsHeatmap <- 'Tissue' #Sample coloring factors 
 png('heatmap.png', width = 10, height = 15, units = 'in', res = 300) 
 staticHeatmap() 
 dev.off()  
## png 
##   2

[heatmap] (heatmap.png)

 heatmapPlotly() # interactive heatmap using Plotly 

4. K-means clustering

 input_nGenesKNN <- 2000    #Number of genes fro k-Means
 input_nClusters <- 4   #Number of clusters 
 maxGeneClustering = 12000
 input_kmeansNormalization <- 'geneMean'    #Normalization
 input_KmeansReRun <- 0 #Random seed 

 distributionSD()  #Distribution of standard deviations 

 KmeansNclusters()  #Number of clusters 

 Kmeans.out = Kmeans()   #Running K-means 
 KmeansHeatmap()   #Heatmap for k-Means 

 #Read gene sets for enrichment analysis 
 sqlite  <- dbDriver('SQLite')
 input_selectGO3 <- 'GOBP'  #Gene set category
 input_minSetSize <- 15 #Min gene set size
 input_maxSetSize <- 2000   #Max gene set size 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO3,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  )  
 # Alternatively, users can use their own GMT files by
 #GeneSets.out <- readGMTRobust('somefile.GMT')  
 results <- KmeansGO()  #Enrichment analysis for k-Means clusters   
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 8.85e-20 125 Response to organic substance
1.86e-17 106 Response to hormone
1.86e-17 99 Oxidation-reduction process
4.90e-17 106 Response to endogenous stimulus
5.84e-17 123 Response to abiotic stimulus
2.24e-16 101 Response to oxygen-containing compound
1.24e-15 96 Cellular response to chemical stimulus
2.66e-15 82 Response to acid chemical
1.40e-14 87 Response to external stimulus
7.95e-14 55 Cell wall organization or biogenesis
B 5.85e-25 48 Cell wall organization or biogenesis
3.43e-22 41 External encapsulating structure organization
3.43e-22 40 Cell wall organization
3.07e-18 25 Drug catabolic process
1.88e-17 20 Phenylpropanoid metabolic process
9.55e-16 22 Cellular response to toxic substance
7.00e-15 25 Plant-type cell wall organization or biogenesis
5.01e-14 15 Phenylpropanoid biosynthetic process
1.36e-13 19 Cellular oxidant detoxification
1.48e-13 15 Hydrogen peroxide catabolic process
C 6.78e-20 38 Cell cycle
6.78e-20 31 Cell division
4.74e-19 26 Mitotic cell cycle process
1.04e-18 28 Mitotic cell cycle
1.05e-17 30 Cell cycle process
3.20e-15 19 Regulation of mitotic cell cycle
2.08e-13 22 Regulation of cell cycle
3.33e-13 17 Regulation of cell cycle process
3.36e-12 15 Cell proliferation
4.83e-12 18 Nuclear division
D 3.70e-82 96 Ribosome biogenesis
1.86e-76 100 Ribonucleoprotein complex biogenesis
1.96e-74 80 RRNA metabolic process
3.80e-74 91 NcRNA processing
5.27e-74 79 RRNA processing
1.11e-70 94 NcRNA metabolic process
1.03e-55 104 RNA processing
2.38e-55 125 Cellular component biogenesis
1.24e-31 34 Ribosomal large subunit biogenesis
1.11e-21 20 Maturation of LSU-rRNA
 input_seedTSNE <- 0    #Random seed for t-SNE
 input_colorGenes <- TRUE   #Color genes in t-SNE plot? 
 tSNEgenePlot()  #Plot genes using t-SNE 

5. PCA and beyond

 input_selectFactors <- 'Sample_Name'   #Factor coded by color
 input_selectFactors2 <- 'Sample_Name'  #Factor coded by shape
 input_tsneSeed2 <- 0   #Random seed for t-SNE 
 #PCA, MDS and t-SNE plots
 PCAplot()  

 MDSplot() 

 tSNEplot()  

 #Read gene sets for pathway analysis using PGSEA on principal components 
 input_selectGO6 <- 'GOBP' 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO6,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  )  
 PCApathway() # Run PGSEA analysis 
## Warning: Package 'KEGG.db' is deprecated and will be removed from Bioconductor
##   version 3.12

 cat( PCA2factor() )   #The correlation between PCs with factors 
## 
##  Correlation between Principal Components (PCs) with factors
## PC1 is correlated with Tissue (p=7.75e-05).

6. DEG1

 input_CountsDEGMethod <- 3 #DESeq2= 3,limma-voom=2,limma-trend=1 
 input_limmaPval <- 0.1 #FDR cutoff
 input_limmaFC <- 2 #Fold-change cutoff
 input_selectModelComprions <- 'Tissue: Elongation_zone2 vs. Meristem_zone1'    #Selected comparisons
 input_selectFactorsModel <- 'Tissue'   #Selected comparisons
 input_selectInteractions <- NULL   #Selected comparisons
 input_selectBlockFactorsModel <- NULL  #Selected comparisons
 factorReferenceLevels.out <- c('Tissue:Meristem_zone1') 

 limma.out <- limma()
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
## Error in estimateDispersionsFit(object, fitType = fitType, quiet = quiet): all gene-wise dispersion estimates are within 2 orders of magnitude
##   from the minimum value, and so the standard curve fitting techniques will not work.
##   One can instead use the gene-wise estimates as final estimates:
##   dds <- estimateDispersionsGeneEst(dds)
##   dispersions(dds) <- mcols(dds)$dispGeneEst
##   ...then continue with testing using nbinomWaldTest or nbinomLRT
 DEG.data.out <- DEG.data()
## Error in DEG.data(): object 'limma.out' not found
 limma.out$comparisons 
## Error in eval(expr, envir, enclos): object 'limma.out' not found
 input_selectComparisonsVenn = limma.out$comparisons[1:3] # use first three comparisons
## Error in eval(expr, envir, enclos): object 'limma.out' not found
 input_UpDownRegulated <- FALSE #Split up and down regulated genes 
 vennPlot() # Venn diagram 
## Error in vennPlot(): object 'limma.out' not found
  sigGeneStats() # number of DEGs as figure 
## Error in sigGeneStats(): object 'limma.out' not found
  sigGeneStatsTable() # number of DEGs as table 
## Error in sigGeneStatsTable(): object 'limma.out' not found

7. DEG2

 input_selectContrast = limma.out$comparisons[1] # use first  comparisons 
## Error in eval(expr, envir, enclos): object 'limma.out' not found
 selectedHeatmap.data.out <- selectedHeatmap.data()
## Error in selectedHeatmap.data(): object 'limma.out' not found
 selectedHeatmap()   # heatmap for DEGs in selected comparison
## Error in selectedHeatmap(): object 'selectedHeatmap.data.out' not found
 # Save gene lists and data into files
 write.csv( selectedHeatmap.data()$genes, 'heatmap.data.csv') 
## Error in selectedHeatmap.data(): object 'limma.out' not found
 write.csv(DEG.data(),'DEG.data.csv' )
## Error in DEG.data(): object 'limma.out' not found
 write(AllGeneListsGMT() ,'AllGeneListsGMT.gmt')
## Error in AllGeneListsGMT(): object 'limma.out' not found
 input_selectGO2 <- 'GOBP'  #Gene set category 
 geneListData.out <- geneListData()  
## Error in geneListData(): object 'input_selectContrast' not found
 volcanoPlot()  
## Error in volcanoPlot(): object 'limma.out' not found
  scatterPlot()  
## Error in scatterPlot(): object 'limma.out' not found
  MAplot()  
## Error in MAplot(): object 'limma.out' not found
  geneListGOTable.out <- geneListGOTable()  
## Error in geneListGOTable(): object 'selectedHeatmap.data.out' not found
 # Read pathway data again 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO2,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  ) 
 input_removeRedudantSets <- TRUE   #Remove highly redundant gene sets? 
 results <- geneListGO()  #Enrichment analysis
## Error in geneListGO(): object 'geneListGOTable.out' not found
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 8.85e-20 125 Response to organic substance
1.86e-17 106 Response to hormone
1.86e-17 99 Oxidation-reduction process
4.90e-17 106 Response to endogenous stimulus
5.84e-17 123 Response to abiotic stimulus
2.24e-16 101 Response to oxygen-containing compound
1.24e-15 96 Cellular response to chemical stimulus
2.66e-15 82 Response to acid chemical
1.40e-14 87 Response to external stimulus
7.95e-14 55 Cell wall organization or biogenesis
B 5.85e-25 48 Cell wall organization or biogenesis
3.43e-22 41 External encapsulating structure organization
3.43e-22 40 Cell wall organization
3.07e-18 25 Drug catabolic process
1.88e-17 20 Phenylpropanoid metabolic process
9.55e-16 22 Cellular response to toxic substance
7.00e-15 25 Plant-type cell wall organization or biogenesis
5.01e-14 15 Phenylpropanoid biosynthetic process
1.36e-13 19 Cellular oxidant detoxification
1.48e-13 15 Hydrogen peroxide catabolic process
C 6.78e-20 38 Cell cycle
6.78e-20 31 Cell division
4.74e-19 26 Mitotic cell cycle process
1.04e-18 28 Mitotic cell cycle
1.05e-17 30 Cell cycle process
3.20e-15 19 Regulation of mitotic cell cycle
2.08e-13 22 Regulation of cell cycle
3.33e-13 17 Regulation of cell cycle process
3.36e-12 15 Cell proliferation
4.83e-12 18 Nuclear division
D 3.70e-82 96 Ribosome biogenesis
1.86e-76 100 Ribonucleoprotein complex biogenesis
1.96e-74 80 RRNA metabolic process
3.80e-74 91 NcRNA processing
5.27e-74 79 RRNA processing
1.11e-70 94 NcRNA metabolic process
1.03e-55 104 RNA processing
2.38e-55 125 Cellular component biogenesis
1.24e-31 34 Ribosomal large subunit biogenesis
1.11e-21 20 Maturation of LSU-rRNA

STRING-db API access. We need to find the taxonomy id of your species, this used by STRING. First we try to guess the ID based on iDEP’s database. Users can also skip this step and assign NCBI taxonomy id directly by findTaxonomyID.out = 10090 # mouse 10090, human 9606 etc.

 STRING10_species = read.csv(STRING10_speciesFile)  
 ix = grep('Arabidopsis thaliana', STRING10_species$official_name ) 
 findTaxonomyID.out <- STRING10_species[ix,1] # find taxonomyID
 findTaxonomyID.out  
## [1] 3702

Enrichment analysis using STRING

  STRINGdb_geneList.out <- STRINGdb_geneList() #convert gene lists
## Error in STRINGdb_geneList(): object 'geneListData.out' not found
 input_STRINGdbGO <- 'Process'  #'Process', 'Component', 'Function', 'KEGG', 'Pfam', 'InterPro' 
 results <- stringDB_GO_enrichmentData()  # enrichment using STRING 
## Error in stringDB_GO_enrichmentData(): object 'selectedHeatmap.data.out' not found
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 8.85e-20 125 Response to organic substance
1.86e-17 106 Response to hormone
1.86e-17 99 Oxidation-reduction process
4.90e-17 106 Response to endogenous stimulus
5.84e-17 123 Response to abiotic stimulus
2.24e-16 101 Response to oxygen-containing compound
1.24e-15 96 Cellular response to chemical stimulus
2.66e-15 82 Response to acid chemical
1.40e-14 87 Response to external stimulus
7.95e-14 55 Cell wall organization or biogenesis
B 5.85e-25 48 Cell wall organization or biogenesis
3.43e-22 41 External encapsulating structure organization
3.43e-22 40 Cell wall organization
3.07e-18 25 Drug catabolic process
1.88e-17 20 Phenylpropanoid metabolic process
9.55e-16 22 Cellular response to toxic substance
7.00e-15 25 Plant-type cell wall organization or biogenesis
5.01e-14 15 Phenylpropanoid biosynthetic process
1.36e-13 19 Cellular oxidant detoxification
1.48e-13 15 Hydrogen peroxide catabolic process
C 6.78e-20 38 Cell cycle
6.78e-20 31 Cell division
4.74e-19 26 Mitotic cell cycle process
1.04e-18 28 Mitotic cell cycle
1.05e-17 30 Cell cycle process
3.20e-15 19 Regulation of mitotic cell cycle
2.08e-13 22 Regulation of cell cycle
3.33e-13 17 Regulation of cell cycle process
3.36e-12 15 Cell proliferation
4.83e-12 18 Nuclear division
D 3.70e-82 96 Ribosome biogenesis
1.86e-76 100 Ribonucleoprotein complex biogenesis
1.96e-74 80 RRNA metabolic process
3.80e-74 91 NcRNA processing
5.27e-74 79 RRNA processing
1.11e-70 94 NcRNA metabolic process
1.03e-55 104 RNA processing
2.38e-55 125 Cellular component biogenesis
1.24e-31 34 Ribosomal large subunit biogenesis
1.11e-21 20 Maturation of LSU-rRNA

PPI network retrieval and analysis

 input_nGenesPPI <- 100 #Number of top genes for PPI retrieval and analysis 
 stringDB_network1(1) #Show PPI network 
## Error in stringDB_network1(1): object 'STRINGdb_geneList.out' not found

Generating interactive PPI

 write(stringDB_network_link(), 'PPI_results.html') # write results to html file 
## Error in stringDB_network_link(): object 'STRINGdb_geneList.out' not found
 browseURL('PPI_results.html') # open in browser 

8. Pathway analysis

 input_selectContrast1 = limma.out$comparisons[1] 
## Error in eval(expr, envir, enclos): object 'limma.out' not found
 #input_selectContrast1 = limma.out$comparisons[3] # manually set
 input_selectGO <- 'GOBP'   #Gene set category 
 #input_selectGO='custom' # if custom gmt file
 input_minSetSize <- 15 #Min size for gene set
 input_maxSetSize <- 2000   #Max size for gene set 
 # Read pathway data again 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  ) 
 input_pathwayPvalCutoff <- 0.2 #FDR cutoff
 input_nPathwayShow <- 30   #Top pathways to show
 input_absoluteFold <- FALSE    #Use absolute values of fold-change?
 input_GenePvalCutoff <- 1  #FDR to remove genes 

 input_pathwayMethod = 1  # 1  GAGE
 gagePathwayData.out <- gagePathwayData()  # pathway analysis using GAGE  
## Error in gagePathwayData(): object 'limma.out' not found
 results <- gagePathwayData.out  #Enrichment analysis for k-Means clusters  
## Error in eval(expr, envir, enclos): object 'gagePathwayData.out' not found
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 8.85e-20 125 Response to organic substance
1.86e-17 106 Response to hormone
1.86e-17 99 Oxidation-reduction process
4.90e-17 106 Response to endogenous stimulus
5.84e-17 123 Response to abiotic stimulus
2.24e-16 101 Response to oxygen-containing compound
1.24e-15 96 Cellular response to chemical stimulus
2.66e-15 82 Response to acid chemical
1.40e-14 87 Response to external stimulus
7.95e-14 55 Cell wall organization or biogenesis
B 5.85e-25 48 Cell wall organization or biogenesis
3.43e-22 41 External encapsulating structure organization
3.43e-22 40 Cell wall organization
3.07e-18 25 Drug catabolic process
1.88e-17 20 Phenylpropanoid metabolic process
9.55e-16 22 Cellular response to toxic substance
7.00e-15 25 Plant-type cell wall organization or biogenesis
5.01e-14 15 Phenylpropanoid biosynthetic process
1.36e-13 19 Cellular oxidant detoxification
1.48e-13 15 Hydrogen peroxide catabolic process
C 6.78e-20 38 Cell cycle
6.78e-20 31 Cell division
4.74e-19 26 Mitotic cell cycle process
1.04e-18 28 Mitotic cell cycle
1.05e-17 30 Cell cycle process
3.20e-15 19 Regulation of mitotic cell cycle
2.08e-13 22 Regulation of cell cycle
3.33e-13 17 Regulation of cell cycle process
3.36e-12 15 Cell proliferation
4.83e-12 18 Nuclear division
D 3.70e-82 96 Ribosome biogenesis
1.86e-76 100 Ribonucleoprotein complex biogenesis
1.96e-74 80 RRNA metabolic process
3.80e-74 91 NcRNA processing
5.27e-74 79 RRNA processing
1.11e-70 94 NcRNA metabolic process
1.03e-55 104 RNA processing
2.38e-55 125 Cellular component biogenesis
1.24e-31 34 Ribosomal large subunit biogenesis
1.11e-21 20 Maturation of LSU-rRNA
 pathwayListData.out = pathwayListData() 
## Error in pathwayListData(): object 'gagePathwayData.out' not found
 enrichmentPlot(pathwayListData.out, 25  ) 
## Error in enrichmentPlot(pathwayListData.out, 25): object 'pathwayListData.out' not found
  enrichmentNetwork(pathwayListData.out )  
## Error in h(simpleError(msg, call)): error in evaluating the argument 'X' in selecting a method for function 'lapply': object 'pathwayListData.out' not found
  enrichmentNetworkPlotly(pathwayListData.out) 
## Error in h(simpleError(msg, call)): error in evaluating the argument 'X' in selecting a method for function 'lapply': object 'pathwayListData.out' not found
 input_pathwayMethod = 3  # 1  fgsea 
 fgseaPathwayData.out <- fgseaPathwayData() #Pathway analysis using fgsea 
## Error in fgseaPathwayData(): object 'limma.out' not found
 results <- fgseaPathwayData.out  #Enrichment analysis for k-Means clusters 
## Error in eval(expr, envir, enclos): object 'fgseaPathwayData.out' not found
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
Cluster adj.Pval Genes Pathways
A 8.85e-20 125 Response to organic substance
1.86e-17 106 Response to hormone
1.86e-17 99 Oxidation-reduction process
4.90e-17 106 Response to endogenous stimulus
5.84e-17 123 Response to abiotic stimulus
2.24e-16 101 Response to oxygen-containing compound
1.24e-15 96 Cellular response to chemical stimulus
2.66e-15 82 Response to acid chemical
1.40e-14 87 Response to external stimulus
7.95e-14 55 Cell wall organization or biogenesis
B 5.85e-25 48 Cell wall organization or biogenesis
3.43e-22 41 External encapsulating structure organization
3.43e-22 40 Cell wall organization
3.07e-18 25 Drug catabolic process
1.88e-17 20 Phenylpropanoid metabolic process
9.55e-16 22 Cellular response to toxic substance
7.00e-15 25 Plant-type cell wall organization or biogenesis
5.01e-14 15 Phenylpropanoid biosynthetic process
1.36e-13 19 Cellular oxidant detoxification
1.48e-13 15 Hydrogen peroxide catabolic process
C 6.78e-20 38 Cell cycle
6.78e-20 31 Cell division
4.74e-19 26 Mitotic cell cycle process
1.04e-18 28 Mitotic cell cycle
1.05e-17 30 Cell cycle process
3.20e-15 19 Regulation of mitotic cell cycle
2.08e-13 22 Regulation of cell cycle
3.33e-13 17 Regulation of cell cycle process
3.36e-12 15 Cell proliferation
4.83e-12 18 Nuclear division
D 3.70e-82 96 Ribosome biogenesis
1.86e-76 100 Ribonucleoprotein complex biogenesis
1.96e-74 80 RRNA metabolic process
3.80e-74 91 NcRNA processing
5.27e-74 79 RRNA processing
1.11e-70 94 NcRNA metabolic process
1.03e-55 104 RNA processing
2.38e-55 125 Cellular component biogenesis
1.24e-31 34 Ribosomal large subunit biogenesis
1.11e-21 20 Maturation of LSU-rRNA
  pathwayListData.out = pathwayListData() 
## Error in pathwayListData(): object 'fgseaPathwayData.out' not found
 enrichmentPlot(pathwayListData.out, 25  ) 
## Error in enrichmentPlot(pathwayListData.out, 25): object 'pathwayListData.out' not found
  enrichmentNetwork(pathwayListData.out )  
## Error in h(simpleError(msg, call)): error in evaluating the argument 'X' in selecting a method for function 'lapply': object 'pathwayListData.out' not found
  enrichmentNetworkPlotly(pathwayListData.out) 
## Error in h(simpleError(msg, call)): error in evaluating the argument 'X' in selecting a method for function 'lapply': object 'pathwayListData.out' not found
   PGSEAplot() # pathway analysis using PGSEA 
## Error in PGSEAplot(): object 'input_selectContrast1' not found

9. Chromosome

 input_selectContrast2 = limma.out$comparisons[1] 
## Error in eval(expr, envir, enclos): object 'limma.out' not found
 #input_selectContrast2 = limma.out$comparisons[3] # manually set
 input_limmaPvalViz <- 0.1  #FDR to filter genes
 input_limmaFCViz <- 2  #FDR to filter genes 
 genomePlotly() # shows fold-changes on the genome 
## Error in genomePlotly(): object 'limma.out' not found

10. Biclustering

 input_nGenesBiclust <- 1000    #Top genes for biclustering
 input_biclustMethod <- 'BCCC()'    #Method: 'BCCC', 'QUBIC', 'runibic' ... 
 biclustering.out = biclustering()  # run analysis

 input_selectBicluster <- 1 #select a cluster 
 biclustHeatmap()   # heatmap for selected cluster 

 input_selectGO4 <- 'GOBP'  #Gene set category 
 # Read pathway data again 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO4,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  )  
 results <- geneListBclustGO()  #Enrichment analysis for k-Means clusters   
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
adj.Pval Genes Pathways
2.3e-47 106 Cell wall organization or biogenesis
1.6e-37 85 External encapsulating structure organization
1.6e-37 83 Cell wall organization
7.4e-26 52 Plant-type cell wall organization or biogenesis
1.6e-24 75 Cell differentiation
9.3e-23 85 Cellular developmental process
1.9e-22 45 Cell wall biogenesis
2.6e-22 94 Carbohydrate metabolic process
9.2e-22 32 Phenylpropanoid metabolic process
5.0e-21 64 Root development

11. Co-expression network

 input_mySoftPower <- 5 #SoftPower to cutoff
 input_nGenesNetwork <- 1000    #Number of top genes
 input_minModuleSize <- 20  #Module size minimum 
 wgcna.out = wgcna()   # run WGCNA  
## Warning: executing %dopar% sequentially: no parallel backend registered
##    Power SFT.R.sq slope truncated.R.sq mean.k. median.k. max.k.
## 1      1    0.270 6.450          0.606     925       938    960
## 2      2    0.224 2.470          0.415     863       885    926
## 3      3    0.475 1.110          0.908     809       837    894
## 4      4    0.603 1.860          0.971     762       794    865
## 5      5    0.671 1.710          0.997     719       755    838
## 6      6    0.652 1.560          0.976     681       718    813
## 7      7    0.722 1.450          0.985     646       684    789
## 8      8    0.663 1.500          0.929     614       653    767
## 9      9    0.705 1.260          0.962     585       624    746
## 10    10    0.733 1.200          0.950     558       597    726
## 11    12    0.774 0.983          0.953     511       548    689
## 12    14    0.819 0.984          0.939     470       505    656
## 13    16    0.834 0.887          0.903     434       467    625
## 14    18    0.919 0.760          0.977     403       433    598
## 15    20    0.913 0.725          0.948     376       402    572
## TOM calculation: adjacency..
## ..will not use multithreading.
##  Fraction of slow calculations: 0.000000
## ..connectivity..
## ..matrix multiplication (system BLAS)..
## ..normalization..
## ..done.
 softPower()  # soft power curve 

  modulePlot()  # plot modules  

  listWGCNA.Modules.out = listWGCNA.Modules() #modules
 input_selectGO5 <- 'GOBP'  #Gene set category 
 # Read pathway data again 
 GeneSets.out <-readGeneSets( geneSetFile,
    convertedData.out, input_selectGO5,input_selectOrg,
    c(input_minSetSize, input_maxSetSize)  ) 
 input_selectWGCNA.Module <- 'Entire network'   #Select a module
 input_topGenesNetwork <- 10    #SoftPower to cutoff
 input_edgeThreshold <- 0.4 #Number of top genes 
 moduleNetwork()    # show network of top genes in selected module
##  softConnectivity: FYI: connecitivty of genes with less than 4 valid samples will be returned as NA.
##  ..calculating connectivities..

 input_removeRedudantSets <- TRUE   #Remove redundant gene sets 
 results <- networkModuleGO()  #Enrichment analysis of selected module
 results$adj.Pval <- format( results$adj.Pval,digits=3 )
 kable( results, row.names=FALSE) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  scroll_box(width = "100%") 
adj.Pval Genes Pathways
2.3e-47 106 Cell wall organization or biogenesis
1.6e-37 85 External encapsulating structure organization
1.6e-37 83 Cell wall organization
7.4e-26 52 Plant-type cell wall organization or biogenesis
1.6e-24 75 Cell differentiation
9.3e-23 85 Cellular developmental process
1.9e-22 45 Cell wall biogenesis
2.6e-22 94 Carbohydrate metabolic process
9.2e-22 32 Phenylpropanoid metabolic process
5.0e-21 64 Root development